#include <iostream>
#include <vector>
using std::cout;
using std::endl;
using std::vector;

void test0(){
    int arr[5] = {1,2,3,4,5};

    //vector理解为一类类
    //将vector中存放的元素确定之后
    //
    //vector<int>就是一个类
    //nums是一个能够存放int型元素的空的vector
    vector<int> nums;
    /* vector<long> nums2; */
    /* vector<char> nums3; */

    vector<int> nums2(10);

    for(auto & ele : nums2){
        cout << ele << " ";
    }
    cout << endl;

    vector<int> nums3(5,6);
    for(auto & ele : nums3){
        cout << ele << " ";
    }
    cout << endl;

    vector<int> nums4{1,2,3,4,5};
    for(auto & ele : nums4){
        cout << ele << " ";
    }
    cout << endl;

    vector<int> nums5(nums4.begin(),nums4.end() - 2 );
    for(auto & ele : nums5){
        cout << ele << " ";
    }
    cout << endl;

}

int main(void){
    test0();
    return 0;
}
